classDiagram
    class Creator {
        <<abstract>>
        +factoryMethod(): Product
        +someOperation(): void
    }
    
    class ConcreteCreator1 {
        +factoryMethod(): Product
    }

    class ConcreteCreator2 {
        +factoryMethod(): Product
    }

    class Product {
        <<interface>>
        +operation(): string
    }

    class ConcreteProduct1 {
        +operation(): string
    }

    class ConcreteProduct2 {
        +operation(): string
    }

    Creator <|-- ConcreteCreator1 : implements
    Creator <|-- ConcreteCreator2 : implements

    Product <|-- ConcreteProduct1 : implements
    Product <|-- ConcreteProduct2 : implements

    ConcreteCreator1 --> ConcreteProduct1 : creates >
    ConcreteCreator2 --> ConcreteProduct2 : creates >
